package com.ibeeking.found.open.b.rest.service;

import com.ibeeking.found.open.service.common.param.QueryOpenAuthInfoParam;
import com.ibeeking.found.open.service.common.vo.OpenAuthVO;
import com.ibeeking.found.open.service.common.vo.UrlVO;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @ClassName IAliPayOpenEventService
 * @Description
 * @Author ibeeking
 * @Date 2021-06-18 12:21
 **/

public interface IAliPayOpenEventService {

    /**

     * 对报文进行验签
     * @param content 验签内容
     * @param sign 签名值
     * @param publicKey 支付宝公钥
     * @param charset 验签字符集
     * @param signType 签名算法
     * @return 验签结果。true: 验签通过； false: 验签失败

     */
    String checkSignature(HttpServletRequest request, HttpServletResponse response, String content, String sign,String publicKey, String charset,String signType);

    /**
     * 开放平台消息事件
     *
     * @param request
     * @param response
     * @return
     */
    Object msgEvent(HttpServletRequest request, HttpServletResponse response);

    /**
     * 获取授权注册页面扫码授权url   显示二维码
     *
     * @param request
     * @return
     * @throws Exception
     * @Author ibeeking
     */
    UrlVO getPreAuthUrl(HttpServletRequest request, Integer type) throws Exception;

    OpenAuthVO queryOrUpdateOpenAuthInfo(QueryOpenAuthInfoParam param) throws Exception;

}
